CC=gcc
CFLAGS=-W -Wall -ansi -pedantic
BFLAGS=-lpthread
BIN=brute

all: $(BIN)

clean:
	rm -fr *.o brute

brute: main.o simple.o multithread.o
	$(CC) -o $(BIN) main.o simple.o multithread.o $(BFLAGS)

main.o: main.c
	$(CC) -o main.o -c main.c

simple.o: lib/Simple.c lib/md5.c
	$(CC) -o simple.o -c lib/Simple.c lib/md5.c

multithread.o: lib/multithread.c
	$(CC) -o multithread.o -c lib/multithread.c

md5.o: lib/md5.c
	$(CC) -o md5.o -c lib/md5.c
